package com.dhj.jvmstudy.chapter05;

import java.util.ArrayList;
import java.util.List;

/**
 * jvisualvm.exe 使用
 */
public class HeapDemo {

    public static void main(String[] args) throws InterruptedException {
        System.out.println("headDemo start...");
        List list = new ArrayList();
        for (int i=0; i<1000; i++){
            String str = "hello num "+i;
            list.add(str);
            Thread.sleep(2000);
            System.out.println(str);
        }
        System.out.println("headDemo end...");
    }
}
